﻿<?xml version="1.0" encoding="utf-8" ?>
<testSuite name="The Query TestSuite" xmlns="http://NBi/TestSuite">
	<test name="No parameter" uid="0001">
		<system-under-test>
			<execution>
				<query>
					select top 1 myColumn from myTable
				</query>
			</execution>
		</system-under-test>
		<assert>
			<equalTo>
				<resultSet>
					<row>
						<cell>FirstValue</cell>
					</row>
				</resultSet>
			</equalTo>
		</assert>
	</test>
	<test name="Two parameters" uid="0001">
		<system-under-test>
			<execution>
				<query>
					select myColumn from myTable where myFirstField=@FirstField and 1=@NonEmpty
					<parameter name="FirstField">Identifier</parameter>
					<parameter name="NonEmpty">1</parameter>
				</query>
			</execution>
		</system-under-test>
		<assert>
			<equalTo>
				<resultSet>
					<row>
						<cell>FirstValue</cell>
					</row>
				</resultSet>
			</equalTo>
		</assert>
	</test>
	<test name="Parameter with SQL Type" uid="0001">
		<system-under-test>
			<execution>
				<query>
					select myColumn from myTable where myFirstField=@FirstField
					<parameter name="FirstField" sql-type="varchar(255)">Identifier</parameter>
				</query>
			</execution>
		</system-under-test>
		<assert>
			<equalTo>
				<resultSet>
					<row>
						<cell>FirstValue</cell>
					</row>
				</resultSet>
			</equalTo>
		</assert>
	</test>
</testSuite>
